package com.distribution.system.manager.profitCondition.impl;

import com.distribution.system.domain.bo.DefaultProfitConditionBO;
import com.distribution.system.manager.profitCondition.ProfitCondition;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author destinyhlp
 * 默认的条件判断
 * @date 2023/5/27 18:50
 */

@Slf4j
@Service
public class DefaultProfitConditionActivation implements ProfitCondition<DefaultProfitConditionBO> {

    /**
     * 激活 u_status = 1 时，该笔订单，设置为完成状态，各级代理佣金到账
     * 当订单卡类型为 "0" 卡id为"795638" 是  判断 status 是否等于 3 若等于 返回true
     */

    @Override
    public boolean condition(DefaultProfitConditionBO defaultProfitConditionBO) {
//        if (Objects.equals(defaultProfitConditionBO.getProductParam(), 795638)) {
//            return defaultProfitConditionBO.getStatus().equals("3");
//        }
//        return defaultProfitConditionBO.getUStatus().equals("1");
        return "3".equals(defaultProfitConditionBO.getStatus());
    }
}
